package com.chinafree.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinafree.permission.model.po.PathPO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @description: TODO
 * @author: longzix
 * @modified By: longzix
 * @date: Created in 2021/7/27 16:52
 * @version:v1.0
 */

public interface PathMapper extends BaseMapper<PathPO> {

    @Select("select distinct path from acl_permission_path where deleted = 0")
    List<String> getAllPAth();


    @Select("select permission_id from acl_permission_path where deleted = 0 and path = #{path}")
    Set<Integer> getPermissionIdListByPath(@Param("path") String path);
}
